package com.chansos.dubbogo.hessian_generator;

import java.io.BufferedWriter;

public class FileWriter {
    public static void write(FileInfo fileInfo) throws Exception {
        BufferedWriter os = null;
        try {
            os = new BufferedWriter(new java.io.FileWriter(fileInfo.getPath()));
            os.write(fileInfo.getStringBuffer().toString());
            os.flush();
        } finally {
            try {
                assert os != null;
                os.close();
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }
}
